import time

print(
    "Press ENTER to begin. Afterwards, press ENTER to 'click' the stopwatch. Press Ctrl-C to quit."
)

input()
print("Started.")
# get the first lap's start time
start_time = time.time()

last_time = start_time

# lap num
lap_num = 1

# 循环处理定时器
try:
    while True:
        input()
        lap_time = round(time.time() - last_time, 2)
        total_time = round(time.time() - start_time, 2)
        print("Lap #%s:%s(%s)" % (lap_num, total_time, lap_time), end="")
        lap_num += 1
        last_time = time.time()
except KeyboardInterrupt:
    print("\nDone")

if __name__ == "__main__":
    pass
